// Timer memory functions
//

void TIM_Store(char memory, unsigned long timer_setting)
{
	long int address;

	address = memory + memory + EE_BASE_ADDR;

	write_eeprom(address, timer_setting & 0xFF);
	write_eeprom(address+1, timer_setting >> 8);
	Delay_Ticks( EE_LATENCY );
}

unsigned long TIM_Fetch(char memory)
{
	unsigned long int result;
	long int address;

	address = memory + memory + EE_BASE_ADDR;

	result = read_eeprom(address);
	result |= ( (unsigned long) read_eeprom(address + 1) << 8 );

	return result;
}